﻿using System;

namespace Moonlite.Services.CodeCompletion
{
    public class JassCodeObject
    {
        public string Name { get; set; }
        public string Code { get; set; }
        public JassCodeObjectType Type { get; set; }

        public int CompareTo(object obj)
        {
            if (obj is JassCodeObject)
            {
                JassCodeObject codeObject = (JassCodeObject)obj;
                return Name.CompareTo(codeObject.Name);
            }
            else
            {
                throw new ArgumentNullException("obj");
            }
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
